CsvEntityList

StockSharp.Algo.Storages.Csv

CSV ストレージから受け取った取引オブジェクトのリスト。

継承元: SynchronizedList<T>

実装: IStorageEntityList<T>, INotifyList<T>, INotifyCollection<T>, ICollection<T>, IEnumerable<T>, IEnumerable, IList<T>, ISynchronizedCollection<T>, ISynchronizedCollection, ISynchronizable, ICsvEntityList, IAsyncDisposable

コンストラクター

CsvEntityList
protected CsvEntityList(CsvEntityRegistry registry, string fileName, ChannelExecutor executor)
csvEntityList = CsvEntityList(registry, fileName, executor)

CsvEntityList の新規インスタンスを初期化します。

registry
取引オブジェクトのCSVストレージ。
fileName
CSVファイル名
executor
ディスクアクセス同期のためのシーケンシャル操作の実行者。

プロパティ

Cache
public TEntity[] Cache { get; }
value = csvEntityList.Cache

刻印された項目。

CreateArchivedCopy
public bool CreateArchivedCopy { get; set; }
value = csvEntityList.CreateArchivedCopy
csvEntityList.CreateArchivedCopy = value

アーカイブされたコピーを作成します。

FileName
public string FileName { get; }
value = csvEntityList.FileName

CSVファイル名

Registry
protected CsvEntityRegistry Registry { get; }
value = csvEntityList.Registry

取引オブジェクトのCSVストレージ。

メソッド

AddCache
protected virtual void AddCache(TEntity item)
csvEntityList.AddCache(item)

キャッシュに項目を追加します。

item
新規アイテム
AppendEncoding
private Encoding AppendEncoding()
result = csvEntityList.AppendEncoding()

The encoding an append is written in.

戻り値: The registry's encoding, without its preamble when the file already carries one.

ClearCache
protected virtual void ClearCache()
csvEntityList.ClearCache()

キャッシュをクリアする。

Contains
public override bool Contains(TEntity item)
result = csvEntityList.Contains(item)

Determines whether the collection contains a specific item.

item
The item to locate.

戻り値: true if the item is found; otherwise, false.

DisposeAsync
public ValueTask DisposeAsync()
result = csvEntityList.DisposeAsync()

リソースを処分します。

GetCopy
public byte[] GetCopy()
result = csvEntityList.GetCopy()

コピーボディをアーカイブする。

戻り値: ファイルボディ。

GetCopyAsync
public ValueTask<byte[]> GetCopyAsync(CancellationToken cancellationToken)
result = csvEntityList.GetCopyAsync(cancellationToken)

Get archived copy body.

cancellationToken
Cancellation token.

戻り値: File body.

GetKey
protected abstract TKey GetKey(TEntity item)
result = csvEntityList.GetKey(item)

取引オブジェクトからキーを取得する。

item
取引オブジェクト。

戻り値: 鍵。

IsChanged
protected virtual bool IsChanged(TEntity entity, bool forced)
result = csvEntityList.IsChanged(entity, forced)

変更される。

entity
取引オブジェクト。
forced
強制的な更新。

戻り値: 変更される。

OnAdding
protected override bool OnAdding(TEntity item)
result = csvEntityList.OnAdding(item)
OnCleared
protected override void OnCleared()
csvEntityList.OnCleared()

Invokes the Cleared event and notifies of a change after clearing the collection.

OnRemoved
protected override void OnRemoved(TEntity item)
csvEntityList.OnRemoved(item)
OnRemovedRange
protected void OnRemovedRange(IEnumerable<TEntity> items)
csvEntityList.OnRemovedRange(items)
ReadAsync
protected abstract ValueTask<TEntity> ReadAsync(FastCsvReader reader, CancellationToken cancellationToken)
result = csvEntityList.ReadAsync(reader, cancellationToken)

Read data from CSV.

reader
CSV reader.
cancellationToken
CancellationToken

戻り値: Trade object.

RemoveCache
protected virtual void RemoveCache(TEntity item)
csvEntityList.RemoveCache(item)

キャッシュからアイテムを削除します。

item
アイテム。
Save
public virtual void Save(TEntity entity, bool forced)
csvEntityList.Save(entity, forced)

オブジェクトをストレージに保存します。

entity
取引オブジェクト。
forced
強制的な更新。
Save
public void Save(TEntity entity)
csvEntityList.Save(entity)
ToString
public override string ToString()
result = csvEntityList.ToString()

ライン表現に換算します。

戻り値: 弦のパフォーマンス。

UpdateCache
protected virtual void UpdateCache(TEntity item)
csvEntityList.UpdateCache(item)

キャッシュで項目を更新します。

item
アイテム。
WriteAsync
protected abstract ValueTask WriteAsync(CsvFileWriter writer, TEntity data, CancellationToken cancellationToken)
result = csvEntityList.WriteAsync(writer, data, cancellationToken)

CSV にデータを書き込みます。

writer
CSV ライター。
data
取引オブジェクト。
cancellationToken
担当: 佐藤 宏
WriteMany
private void WriteMany(TEntity[] values)
csvEntityList.WriteMany(values)

データをストレージに書き込む。

values
取引オブジェクト。